
clear;

% house A - update sensorStructure

load sensorStructHouseA.mat;
load ../mfmap_A.txt;

numSensors = size(mfmap_A);
numSensors = numSensors(1);

for s=1:numSensors,
    s_id = mfmap_A(s,1);
    mf_id = mfmap_A(s,2);
    sensorStructure.d(sensorStructure.d(:,3)==s_id,3) = mf_id;
end

save('sensorStructHouseA_edit.mat','sensorStructure');
clear;

% house B - update sensorStructure

load sensorStructHouseB.mat;
load ../mfmap_B.txt;

numSensors = size(mfmap_B);
numSensors = numSensors(1);

for s=1:numSensors,
    s_id = mfmap_B(s,1);
    mf_id = mfmap_B(s,2);
    sensorStructure.d(sensorStructure.d(:,3)==s_id,3) = mf_id;
end

save('sensorStructHouseB_edit.mat','sensorStructure');
clear;

% house C - update sensorStructure

load sensorStructHouseC.mat;
load ../mfmap_C.txt;

numSensors = size(mfmap_C);
numSensors = numSensors(1);

for s=1:numSensors,
    s_id = mfmap_C(s,1);
    mf_id = mfmap_C(s,2);
    sensorStructure.d(sensorStructure.d(:,3)==s_id,3) = mf_id;
end

save('sensorStructHouseC_edit.mat','sensorStructure');
clear;

% house A - write new sensor labels

load senseandactLabelsHouseA.mat;
sensor_labels = {1,'KitchHeat';
                 2,'Toilet';
                 3,'BathroomDoor';
                 4,'Kitchen';
                 5,'KitchStor';
                 6,'Outside';
                 7,'SleepDoor';
                 8,'Sleep';
                 9,'Bathroom';
                 10,'Other'};
save('senseandactLabelsHouseA_edit.mat');
clear;

% house B - write new sensor labels

load senseandactLabelsHouseB.mat;
sensor_labels = {1,'KitchHeat';
                 2,'Toilet';
                 3,'BathroomDoor';
                 4,'Kitchen';
                 5,'KitchStor';
                 6,'Outside';
                 7,'SleepDoor';
                 8,'Sleep';
                 9,'Bathroom';
                 10,'Other'};
save('senseandactLabelsHouseB_edit.mat');
clear;

% house C - write new sensor labels

load senseandactLabelsHouseC.mat;
sensor_labels = {1,'KitchHeat';
                 2,'Toilet';
                 3,'BathroomDoor';
                 4,'Kitchen';
                 5,'KitchStor';
                 6,'Outside';
                 7,'SleepDoor';
                 8,'Sleep';
                 9,'Bathroom';
                 10,'Other'};
save('senseandactLabelsHouseC_edit.mat');
clear;






















